<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
	<class name="Blog.Net.Common.DataObjects.BlogEntry, Blog.Net" table="blog_entry">
		<id name="Id" type="Int32" unsaved-value="null">
			<column name="id" sql-type="int" not-null="true" unique="true" index="PRIMARY"/>
			<generator class="hilo" />
		</id>
		<property name="Subject" type="String">
			<column name="subject" length="255" sql-type="varchar" not-null="true"/>
		</property>
		<property name="Subhead" type="String">
			<column name="subhead" length="255" sql-type="varchar" not-null="false"/>
		</property>
		<property name="Body" type="String">
			<column name="body" length="65535" sql-type="text" not-null="true"/>
		</property>
		<property name="Views" type="Decimal">
			<column name="views" sql-type="decimal" not-null="true"/>
		</property>
		<property name="Points" type="Int32">
			<column name="points" sql-type="int" not-null="true"/>
		</property>
		<property name="Votes" type="Int32">
			<column name="votes" sql-type="int" not-null="true"/>
		</property>
		<property name="CreateDate" type="DateTime">
			<column name="create_date" sql-type="datetime" not-null="true"/>
		</property>
		<bag name="BlogResponses" inverse="true" lazy="true" cascade="all-delete-orphan">
			<key column="blog_entry_id"/>
			<one-to-many class="Blog.Net.Common.DataObjects.BlogResponse, Blog.Net"/>
		</bag>
		<bag name="BlogCategories" table="mtm_blog_entry_blog_category" inverse="false" lazy="true" cascade="none">
			<key>
				<column name="blog_entry_id" sql-type="int" not-null="true"/>
			</key>
			<many-to-many class="Blog.Net.Common.DataObjects.BlogCategory, Blog.Net">	
				<column name="blog_category_id" sql-type="int" not-null="true"/>
			</many-to-many>
		</bag>
	</class>
</hibernate-mapping>